<!--
 * @Author: wangming
 * @Date: 2021-04-01 17:41:49
 * @LastEditors: wangming
 * @LastEditTime: 2021-05-06 13:58:43
 * @Description: file content
-->
<template>
  <div>
    <el-form-item label="日期类型">
      <el-select
        v-model="value.__config.format"
        placeholder="请选择"
        style="width: 100%"
      >
        <el-option
          :label="item.label"
          :value="item.format"
          v-for="(item, index) in dateConfig"
          :key="index"
        >
        </el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="日期范围">
      <el-select
        clearable
        v-model="value.__config.dateLimitType"
        placeholder="请选择"
        style="width: 100%"
      >
        <el-option
          :label="i.label"
          :value="i.value"
          v-for="(i, index) in dateLimitTypeList"
          :key="index"
        >
        </el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="默认系统日期" class="tr">
      <el-switch v-model="value.__config.isCurrentDate"></el-switch>
    </el-form-item>
    <el-form-item
      label="时间范围"
      v-if="value.__config.format === 'YYYY-MM-DD HH:mm'"
    >
      <el-select
        v-model="value.__config.timefilter"
        placeholder="请选择"
        style="width: 100%"
      >
        <el-option label="不限制" :value="1"> </el-option>
        <el-option label="5分钟为单位" :value="5"> </el-option>
        <el-option label="15分钟为单位" :value="15"> </el-option>
        <el-option label="30分钟为单位" :value="30"> </el-option>
      </el-select>
    </el-form-item>
  </div>
</template>

<script>
import { dateLimitTypeList, dateConfig } from '@/utils/dateLimitTypeList';
import basicmixins from './basicmixins';
export default {
  mixins: [basicmixins],
  data() {
    return { dateConfig, dateLimitTypeList };
  },
  methods: {},
};
</script>

<style lang="scss" scoped></style>
